/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package verins.beans;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author hectdx
 */
@Entity
@Table(name = "personarnv", schema = "verinscribe")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Personarnv.findAll", query = "SELECT p FROM Personarnv p"),
    @NamedQuery(name = "Personarnv.findByIdpersonarnv", query = "SELECT p FROM Personarnv p WHERE p.idpersonarnv = :idpersonarnv"),
    @NamedQuery(name = "Personarnv.findByDni", query = "SELECT p FROM Personarnv p WHERE p.dni = :dni"),
    @NamedQuery(name = "Personarnv.findByApepaterno", query = "SELECT p FROM Personarnv p WHERE p.apepaterno = :apepaterno"),
    @NamedQuery(name = "Personarnv.findByApematerno", query = "SELECT p FROM Personarnv p WHERE p.apematerno = :apematerno"),
    @NamedQuery(name = "Personarnv.findByNombres", query = "SELECT p FROM Personarnv p WHERE p.nombres = :nombres"),
    @NamedQuery(name = "Personarnv.findByUbigeo", query = "SELECT p FROM Personarnv p WHERE p.ubigeo = :ubigeo"),
    @NamedQuery(name = "Personarnv.findByFechanac", query = "SELECT p FROM Personarnv p WHERE p.fechanac = :fechanac"),
    @NamedQuery(name = "Personarnv.findByInddefunc", query = "SELECT p FROM Personarnv p WHERE p.inddefunc = :inddefunc")})
public class Personarnv implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "idpersonarnv", nullable = false)
    private Integer idpersonarnv;
    @Basic(optional = false)
    @Column(name = "dni", nullable = false, length = 8)
    private String dni;
    @Column(name = "apepaterno", length = 35)
    private String apepaterno;
    @Column(name = "apematerno", length = 35)
    private String apematerno;
    @Column(name = "nombres", length = 30)
    private String nombres;
    @Column(name = "ubigeo", length = 6)
    private String ubigeo;
    @Column(name = "fechanac")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechanac;
    @Lob
    @Column(name = "firma")
    private byte[] firma;
    @Lob
    @Column(name = "huella")
    private byte[] huella;
    @Column(name = "inddefunc")
    private Integer inddefunc;

    public Personarnv() {
    }

    public Personarnv(Integer idpersonarnv) {
        this.idpersonarnv = idpersonarnv;
    }

    public Personarnv(Integer idpersonarnv, String dni) {
        this.idpersonarnv = idpersonarnv;
        this.dni = dni;
    }

    public Integer getIdpersonarnv() {
        return idpersonarnv;
    }

    public void setIdpersonarnv(Integer idpersonarnv) {
        this.idpersonarnv = idpersonarnv;
    }

    public String getDni() {
        return dni;
    }

    public void setDni(String dni) {
        this.dni = dni;
    }

    public String getApepaterno() {
        return apepaterno;
    }

    public void setApepaterno(String apepaterno) {
        this.apepaterno = apepaterno;
    }

    public String getApematerno() {
        return apematerno;
    }

    public void setApematerno(String apematerno) {
        this.apematerno = apematerno;
    }

    public String getNombres() {
        return nombres;
    }

    public void setNombres(String nombres) {
        this.nombres = nombres;
    }

    public String getUbigeo() {
        return ubigeo;
    }

    public void setUbigeo(String ubigeo) {
        this.ubigeo = ubigeo;
    }

    public Date getFechanac() {
        return fechanac;
    }

    public void setFechanac(Date fechanac) {
        this.fechanac = fechanac;
    }

    public byte[] getFirma() {
        return firma;
    }

    public void setFirma(byte[] firma) {
        this.firma = firma;
    }

    public byte[] getHuella() {
        return huella;
    }

    public void setHuella(byte[] huella) {
        this.huella = huella;
    }

    public Integer getInddefunc() {
        return inddefunc;
    }

    public void setInddefunc(Integer inddefunc) {
        this.inddefunc = inddefunc;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idpersonarnv != null ? idpersonarnv.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Personarnv)) {
            return false;
        }
        Personarnv other = (Personarnv) object;
        if ((this.idpersonarnv == null && other.idpersonarnv != null) || (this.idpersonarnv != null && !this.idpersonarnv.equals(other.idpersonarnv))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "verins.beans.Personarnv[ idpersonarnv=" + idpersonarnv + " ]";
    }
    
}
